<?php

class CHCCredits extends AbstractHCObject
{
    /**
     * Whether to show the credits text. Defaults to true.
     *  
     * @param Boolean $pbBoolean
     * @return string
     */
    public function setEnabled($pbBoolean=true)
    {
        if (CSDebug::assertBoolean($pbBoolean)) return false;
        
        $this->setParam('enabled', $pbBoolean);
    }
    
    
    /**
     *  The URL for the credits label. 
     *  
     *  Defaults to "http://www.highcharts.com".
     * 
     * @param $psString
     */
    public function setUrl($psString='')
    {
       if (CSDebug::assertString($psString, true)) return false;
       
       $this->setParam('href', $psString);
    }
    
    
    /**
     * CSS styles for the credits label. Defaults to:
     * array
     * (
     * 		position: 'absolute',
     * 		right: '50px',
     * 		bottom: '5px',
     * 		color: '#999',
     * 		fontSize: '10px',
     * 		textDecoration: 'none'
     * );
     * 
     * TODO : checker si le name == "itemStyle" et pas "style"
     * 
     * @param $pasArray
     */
    public function setStyle($pasArray)
    {
      if (CSDebug::assertArray($pasArray)) return false;
      
      $this->setParam('style', $pasArray);
    }
    
    
    /**
     *  The text for the credits label. 
     *  
     *  Defaults to "Highcharts.com".
     *  
     * @param $psString
     */
    public function setText($psString)
    {
      if (CSDebug::assertString($psString)) return false;
      
      $this->setParam('text', $psString);
    }
}

?>